package com.qf.j2102.service.impl;


import com.qf.j2102.mapper.SysCarMapper;
import com.qf.j2102.po.SysCar;
import com.qf.j2102.service.SysCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysCarServiceImpl implements SysCarService {

    @Autowired
    private SysCarMapper carDao;

    @Override
    public List<SysCar> findByprice(Integer cid) {

        List<SysCar> list = carDao.findByPrice(cid);

        return list;
    }

    @Override
    public List<SysCar> findByNum(Integer cid) {
        List<SysCar> list = carDao.findByNum(cid);

        return list;
    }

    @Override
    public SysCar findById(Integer id) {
        SysCar car = carDao.selectByPrimaryKey(id);
        return car;
    }
}
